<?php
if (!defined('ABSPATH')) {
	define('ABSPATH', dirname(dirname(__FILE__)) . '/');
}

require_once ABSPATH . 'dr-config.php';
require_once ABSPATH . DRINC . '/dr-base.php';
require_once ABSPATH . DRINC . '/dr-functions.php';


$question_id = dr_post('qid');
$best_id = dr_post('best_id');
$set_type = dr_post('set_type');

if (!empty($question_id) && !empty($set_type)) {
	# 获取当前用户的id
	$user_id = dr_get_logged_in_userid();
	# 进行标记操作
	echo dr_set_best($user_id, $question_id, $best_id, $set_type);
} else {
	echo 0;
}

